﻿@model ShoppingCartSettingsModel


@using Telerik.Web.Mvc.UI;
@using (Html.BeginForm())
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Administration/Content/images/ico-configuration.png")" alt="" />
            @T("Admin.Configuration.Settings.ShoppingCart")
        </div>
        <div class="options">
            <button type="submit" name="save" value="save" class="t-button">@T("Admin.Common.Save")</button>
        </div>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {

            $("#@Html.FieldIdFor(model => model.MiniShoppingCartEnabled)").click(toggleMiniShoppingCartDisplayProducts);

            toggleMiniShoppingCartDisplayProducts();
        });

        function toggleMiniShoppingCartDisplayProducts() {
            if (getE('@Html.FieldIdFor(model => model.MiniShoppingCartEnabled)').checked) {
                $('#pnlMiniShoppingCartDisplayProducts').show();
            }
            else {
                $('#pnlMiniShoppingCartDisplayProducts').hide();
            }
        }
        
    </script>
    
@Html.ValidationSummary(false)
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DisplayCartAfterAddingProduct):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.DisplayCartAfterAddingProduct)
                @Html.ValidationMessageFor(model => model.DisplayCartAfterAddingProduct)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DisplayWishlistAfterAddingProduct):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.DisplayWishlistAfterAddingProduct)
                @Html.ValidationMessageFor(model => model.DisplayWishlistAfterAddingProduct)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.MaximumShoppingCartItems):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.MaximumShoppingCartItems)
                @Html.ValidationMessageFor(model => model.MaximumShoppingCartItems)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.MaximumWishlistItems):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.MaximumWishlistItems)
                @Html.ValidationMessageFor(model => model.MaximumWishlistItems)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ShowProductImagesOnShoppingCart):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ShowProductImagesOnShoppingCart)
                @Html.ValidationMessageFor(model => model.ShowProductImagesOnShoppingCart)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ShowProductImagesOnWishList):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ShowProductImagesOnWishList)
                @Html.ValidationMessageFor(model => model.ShowProductImagesOnWishList)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ShowDiscountBox):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ShowDiscountBox)
                @Html.ValidationMessageFor(model => model.ShowDiscountBox)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.ShowGiftCardBox):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.ShowGiftCardBox)
                @Html.ValidationMessageFor(model => model.ShowGiftCardBox)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.CrossSellsNumber):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.CrossSellsNumber)
                @Html.ValidationMessageFor(model => model.CrossSellsNumber)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.EmailWishlistEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.EmailWishlistEnabled)
                @Html.ValidationMessageFor(model => model.EmailWishlistEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.MiniShoppingCartEnabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.MiniShoppingCartEnabled)
                @Html.ValidationMessageFor(model => model.MiniShoppingCartEnabled)
            </td>
        </tr>
        <tr id="pnlMiniShoppingCartDisplayProducts">
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.MiniShoppingCartDisplayProducts):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.MiniShoppingCartDisplayProducts)
                @Html.ValidationMessageFor(model => model.MiniShoppingCartDisplayProducts)
            </td>
        </tr>
    </table>
}